package org.csmzxy.class2333;

public class Work02{
    public static void main(String[] args) {
        int[] arr = {1, 13, 2, 3, 8};
        int maxValue = arr[0];
        int maxIndex = 0;
        for (int i = 0; i < arr.length - 1; i++) {
                if (arr[i] > maxValue) {
                    maxValue = arr[i];
                    maxIndex = i;
                }
            }
        System.out.println("数组中最大值为"  + maxValue + "位于数组中第" + (maxIndex+1) + "个的位置");
        }
    }

